package com.sk.cardeal.callback;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.sk.cardeal.R;
import com.sk.cardeal.base.BaseDialogFragment;

import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * Created by sk on 2018/2/1.
 */

public class ChooseSexDialogFragment extends BaseDialogFragment {


    private MyCallBack myCallBack;

    public MyCallBack getMyCallBack() {
        return myCallBack;
    }

    public void setMyCallBack(MyCallBack myCallBack) {
        this.myCallBack = myCallBack;
    }

    @Override
    protected int getContentView() {
        return R.layout.dialog_choose_dialog;
    }


    @OnClick({R.id.male, R.id.fe_male})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.male:
                dismiss();
                if(myCallBack!=null){
                    myCallBack.chooseSex(1);
                }
                break;
            case R.id.fe_male:
                dismiss();
                if(myCallBack!=null){
                    myCallBack.chooseSex(2);
                }
                break;
        }
    }
}
